/*************************************************
Author: will
Date: 11/9/2012
Description:
Notes: 
*************************************************/

#ifndef __cmdcard_h__
#define __cmdcard_h__

#include "../maindef.h"
#include "commclass.h"
#include "PBMsgHead.pb.h"
#include "MsgCard.pb.h"
#include "MsgStorage.pb.h"

class CMainCtrl;
//占卜、卡片收取等功能
class CCmdCard : public CTAsyncCmd
{
public:
    virtual int Do(void* pData);
    virtual int AnsClients(int iRet);
    virtual int LogicDo(int iRet);

    CMainCtrl* pstMainCtrl;
    PBMsgHead  stMsgHead;
    CEnpNetHead stEnpHead;

    unsigned int uiGID;
    MsgReqCard stReq;

    MsgAnsTurnOver stTurnOverAns;
}; 

//卡片穿、脱
class CCmdCardRole : public CTAsyncCmd
{
public:
    virtual int Do(void* pData);
    virtual int AnsClients(int iRet);
    virtual int LogicDo(int iRet);

    CMainCtrl* pstMainCtrl;
    PBMsgHead  stMsgHead;
    CEnpNetHead stEnpHead;

    unsigned int uiGID;
    MsgReqCardRole stReq;
    MsgAnsCardRole stAns;
}; 

//命运漩涡相关
class CCmdCardVortex : public CTAsyncCmd
{
public:
    virtual int Do(void* pData);
    virtual int AnsClients(int iRet);
    virtual int LogicDo(int iRet);

    CMainCtrl* pstMainCtrl;
    PBMsgHead  stMsgHead;
    CEnpNetHead stEnpHead;

    unsigned int uiGID;
    MsgReqVortex stReq;

    MsgAnsVortex stAns;

private:
    int GetNowStat(int iRoleID, CPlayerBaseInfo stPlayerBaseInfo, CPlayerDetailInfo& stPlayerDetailInfo);
};

//卡片合成
class CCmdCardComb : public CTAsyncCmd
{
public:
    virtual int Do(void* pData);
    virtual int AnsClients(int iRet);
    virtual int LogicDo(int iRet);

    CMainCtrl* pstMainCtrl;
    PBMsgHead  stMsgHead;
    CEnpNetHead stEnpHead;

    unsigned int uiGID;
    MsgReqCardComb stReq;
};



#endif // __cmdcard_h__

